package com.wing.sms.feign;

import com.wing.common.utils.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "${sms.appName}",fallback = com.wing.sms.feign.SmsClientFallback.class)
public interface SmsClient {

    /**
     * 发送手机验证码
     * @param phone
     * @return
     */
    @GetMapping("/sms/admin/sendSmsCode")
    JsonResult sendSmsCode(@RequestParam("phone") String phone);

    /**
     * 发送指令校验码
     * @param phone
     * @param code
     * @return
     */
    @GetMapping("/sms/admin/sendInstructCode")
    JsonResult sendInstructCode(@RequestParam("phone") String phone,@RequestParam("code") String code);

    /**
     * 发送领新申请通过通知
     * @param phone
     * @param code
     * @return
     */
    @GetMapping("/sms/admin/noticeCode")
    JsonResult sendNoticeCode(@RequestParam("phone") String phone,@RequestParam("code") String code);

    /**
     * 库存不足发送短信通知
     * @param phone
     * @param code
     * @return
     */
    @GetMapping("/sms/admin/alarmNoticeCode")
    JsonResult sendAlarmNoticeCode(@RequestParam("phone") String phone,@RequestParam("code") String code);

}
